<%
# this partial expects: +comment+ to display
issue_changes = comment.issue_changes
attachments = comment.attachments
-%>
<% div_for comment do %>
  <h3>
    <% if comment.user == @current_user -%>
    <span class="edit_link">
    <%= link_to 'edit', edit_comment_url( @project.name, @issue.local_id, comment ) -%>
    </span>
    <% end -%>
    <%= comment.summary %>&nbsp;
    <span class="comment_details">
      <%= time_ago_in_words( comment.created_at ) %> ago by
      <%= link_to comment.user.display, url_for( comment.user ) %> at
      <%= comment.created_at.strftime( DATE_TIME_FORMAT ) %>
    </span>
  </h3>
  <div class="comment_content">
    <%= wiki comment.details %>
  </div>
  <% if issue_changes.size + attachments.size > 0 -%>
  <div class="attachments_and_changes">
    <%= render :partial => 'shared/changes',
               :locals => { :changes => issue_changes } %>
    <%= render :partial => 'shared/attachments',
               :locals => { :attachments => attachments } %>
  </div>
  <% end -%>
<% end -%>
